<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DB
 *
 * @author thanhdx
 */
class DB extends PDO {

    private $dsn = "mysql:dbname=thanhdx;host=localhost";
    private $username = "root";
    private $passwd = "";
    private $options = null;

    public function __construct() {
        try {
            parent::__construct($this->dsn, $this->username, $this->passwd, $this->options);
            $this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        } catch (PDOException $e) {
            print $e->getMessage();
        };
    }
    

}

?>
